package com.sky.service.user.impl;

import com.sky.entity.Category;
import com.sky.service.common.CommonCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userCategoryService")
@Slf4j
public class CategoryServiceImpl implements com.sky.service.user.CategoryService {

    private final CommonCategoryService commonCategoryService;

    @Autowired
    public CategoryServiceImpl(CommonCategoryService commonCategoryService) {
        this.commonCategoryService = commonCategoryService;
    }

    /**
     * 根据分类信息获取分类实体集合
     * 通用方法
     * @param categoryType 分类信息
     * @return 分类实体类集合
     */
    @Override
    public List<Category> listCategory(Integer categoryType) {
        return commonCategoryService.listCategory(categoryType);
    }
}
